﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Xml;


namespace ToolsForCMIS
{
    public partial class frmMain : Form
    {
        public frmMain()
        {
            InitializeComponent();
            MaximizedBounds = Screen.GetWorkingArea(this);
        }

        BindingSource myBindingSource;

        private void ctlModernBlack1_Load(object sender, EventArgs e)
        {
            LoadXmlFile();
        }

        private void LoadXmlFile()
        {
            try
            {
                clsConnectData bus = new clsConnectData();
                DataSet ds = bus.GetData();
                myBindingSource = new BindingSource();
                myBindingSource.DataSource = ds;
                myBindingSource.DataMember = ds.Tables[0].TableName;
                bindingNavigator1.BindingSource = myBindingSource;
                //dgvDanhSachDv.DataSource = ds.Tables[0];
                dgvDanhSachDv.DataSource = myBindingSource;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            } 
        }

        private void btThem_Click(object sender, EventArgs e)
        {

        }

        private void bindingNavigator1_RefreshItems(object sender, EventArgs e)
        {

        }

        private void toolStripButtonSaveItem_Click(object sender, EventArgs e)
        {

        }

        private void bindingNavigatorDeleteItem_Click(object sender, EventArgs e)
        {

        }

        private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e)
        {

        }
     
    }
}
